package com.qingcheng.consumer;

import com.qingcheng.service.pay.WeiXinPayService;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessageListener;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Welcome to the most Amazing IntelliJ IIIDEA.
 * Creat0r: ^_^ fffantianxing ^_^
 * Date: 2019-07-23
 * Time: 12:39
 */
public class SmsMessageConsumer implements MessageListener {

    @Autowired
    private WeiXinPayService weiXinPayService;
    @Override
    public void onMessage(Message message) {

        String orderId = new String(message.getBody());
        weiXinPayService.checkPayStatus(orderId);
    }
}
